<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Product extends CI_Controller {

    private static $layout_data = array();
    private static $product_data = array();

    public function __construct()
    {
        parent::__construct();

        $this->layout_data['pageTitle'] = 'Hoa Khô Tường Vi - Shop online - Hoa - Bán Hoa';
        $this->layout_data['navTab'] = 'product';

        //Load model product
        $this->load->model('product_model', 'productModel');
    }

    public function index()
    {

        $this->product_data = '';

        //Set layout content
        $this->layout_data['content'] = $this->load->view('product/index', $this->prodcut_data, TRUE);

        //render to layout
        $this->load->view('layouts/main', $this->layout_data);
    }

    public function topNewProduct()
    {
        //Set limit offset
        $limit = 8;
        $offset = 0;

        $this->product_data['arrProduct'] = $this->productModel->getListProduct($limit, $offset);

        //render to layout
        $this->load->view('block/top_new_product', $this->product_data);
    }
}

/* End of file Home.php */
/* Location: ./application/controllers/welcome.php */